'''
Created on 2009-11-16

@author: jm
'''
from model.Model import JsonModel
from google.appengine.ext import db

class ServerJDO(JsonModel):
    url = db.StringProperty(required=True) 
    name = db.StringProperty() 
    desc = db.StringProperty()
    autoUser = db.UserProperty(auto_current_user_add=True)
    creationTime = db.DateTimeProperty(auto_now_add=True)
    lastUpdate = db.DateTimeProperty(auto_now=True)
    lastConnexionTime = db.DateTimeProperty()
    timeElapsed= db.ListProperty(int)


def createN(n):
    for i in range(n):
        ServerJDO(url="123",name="server "+str(n),desc="auto created").put()